// window窗口load加载
//页面元素加载完了之后，触发这个事件
window.onload = function() {
	//匿名函数优雅的写法

	//	document.getElementById("btn").onclick = function(){
	//		var pbq = document.getElementsByTagName("p");
	//		for(var i = 0 ; i < pbq.length ; i++){
	//		pbq[i].innerHTML="改变！"	;
	//		}
	//	}

	var gb = document.getElementsByClassName("box")[0];
	gb.onmouseover = function() {
		gb.style.background = "lightpink";
		gb.innerHTML = "不要碰方块";
		gb.style.textAlign = "center"
		gb.style.lineHeight = "500px"
		gb.style.borderRadius = "0px";
		gb.style.margin = "auto";
		gb.style.transition = "2s";
		gb.style.fontSize = "60px";
		gb.style.color = "#fff";
		gb.style.marginTop = "50px"
	}

	gb.onmouseout = function() {
		//this这个
		//this等于document.getElementsByClassName("box")[0]
		this.style.background = "bisque";
		this.innerHTML = "";
		this.style.borderRadius = "50%";
		this.style.transition = "2s";
	}

}